<?php


namespace app\common\utils;


class Questions
{
    public static function getQuestionChartType($questions)
    {
        foreach ($questions["widgetList"] as $k => &$v) {
            $v["chart_type"] = 1;
        }
        return $questions;
    }

    public static function getChartTypeByDom(string $dom): int
    {
        $chartType = 2;
        switch ($dom) {
            case "input":
            case "textarea":
            case "label":
                $chartType = 1;
                break;
        }
        return $chartType;
    }
}